import request from '@/utils/publicUtils/request'

/**
 * @description:获取列表
 * @Author: 包旭慧
 * @return {*}
 */
export function getList(url, params) {
  return request({
    url: url,
    method: 'get',
    params: params
  })
}

/**
 * @description: 数据保存/修改数据
 * @Author: 包旭慧
 * @param {*} data
 * @return {*}
 */
export function saveOrUpdate(url, data) {
  return request({
    url: url,
    method: 'POST',
    data: data
  })
}

/**
 * @description: 详情
 * @Author: 包旭慧
 * @param {*} data
 * @return {*}
 */
export function getDetail(url, params) {
  return request({
    url: url,
    method: 'GET',
    params: params
  })
}
/**
 * @description: 删除
 * @Author: 包旭慧
 * @param {*} id
 * @return {*}
 */
export function removeIdsApi(url, params) {
  return request({
    url: url,
    method: 'get',
    params: params
  })
}
/**
 * @description: 各种操作
 * @Author: baoxuhui
 * @param {*} url
 * @param {*} data
 * @return {*}
 */
export function methodPostApi(url, data) {
  return request({
    url: url,
    method: 'post',
    data: data
  })
}
/**
 * @description: 各种操作
 * @Author: baoxuhui
 * @param {*} url
 * @param {*} data
 * @return {*}
 */
export function methodGetApi(url, params) {
  return request({
    url: url,
    method: 'get',
    params: params
  })
}

// 超大附件分片上传
export function uploadFile(data) {
  return request({
    url: '/sys/annex/upload',
    method: 'post',
    data: data,
    // data: _formData,
    async: true,
    processData: false,
    contentType: false
  })
}
